﻿<UserControl x:Class="FR.SAFTAnalyser.Views.StockHeaderView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"  
             ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="True">
    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <Grid ScrollViewer.CanContentScroll="True">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <Label Content="Versão:" Grid.Column="0" HorizontalAlignment="Right" Margin="3" Grid.Row="0"/>
            <TextBox x:Name="fileVersionTextBox" Grid.Column="1" Height="24" Margin="3" Grid.Row="0" IsReadOnly="True"
                             Text="{Binding Cabecalho.FileVersion, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True}">
                <TextBox.ToolTip>
                    <Border>
                        <StackPanel>
                            <TextBlock Text="{Binding Cabecalho.Tooltip.FileVersion}"/>
                        </StackPanel>
                    </Border>
                </TextBox.ToolTip>
            </TextBox>
            <Label Content="NIF:" Grid.Column="0" HorizontalAlignment="Right" Margin="3" Grid.Row="1" />
            <TextBox x:Name="taxRegistrationNumberTextBox" Grid.Column="1" Height="23" Margin="3" Grid.Row="1" IsReadOnly="True"
                             Text="{Binding Cabecalho.TaxRegistrationNumber, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True}">
                <TextBox.ToolTip>
                    <StackPanel>
                        <TextBlock Text="{Binding Cabecalho.Tooltip.TaxRegistrationNumber}"/>
                    </StackPanel>
                </TextBox.ToolTip>
            </TextBox>
            <Label Content="Ano fiscal:" Grid.Column="0" HorizontalAlignment="Right" Margin="3" Grid.Row="2" />
            <TextBox x:Name="filcalYearTextBox" Grid.Column="1" Height="23" Margin="3" Grid.Row="2" IsReadOnly="True"
                             Text="{Binding Cabecalho.FiscalYear, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True}">
                <TextBox.ToolTip>
                    <Border>
                        <StackPanel>
                            <TextBlock Text="{Binding Cabecalho.Tooltip.FiscalYear}"/>
                        </StackPanel>
                    </Border>
                </TextBox.ToolTip>
            </TextBox>
            <Label Content="Data de fim:" Grid.Column="0" HorizontalAlignment="Right" Margin="3" Grid.Row="3"  />
            <TextBox x:Name="endDateTextBox" Grid.Column="1" Height="23" Margin="3" Grid.Row="3" IsReadOnly="True"
                             Text="{Binding Cabecalho.EndDate, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True}">
                <TextBox.ToolTip>
                    <Border>
                        <StackPanel>
                            <TextBlock Text="{Binding Cabecalho.Tooltip.EndDate}"/>
                        </StackPanel>
                    </Border>
                </TextBox.ToolTip>
            </TextBox>
            <Label Content="Existe Stock:" Grid.Column="0" HorizontalAlignment="Right" Margin="3" Grid.Row="4"  />
            <CheckBox x:Name="noStockTextBox" Grid.Column="1" Height="23" Margin="3" Grid.Row="4" IsEnabled="False" 
                      IsChecked="{Binding Cabecalho.NoStock, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True}">
                <CheckBox.ToolTip>
                    <Border>
                        <StackPanel>
                            <TextBlock Text="{Binding Cabecalho.Tooltip.NoStock}"/>
                        </StackPanel>
                    </Border>
                </CheckBox.ToolTip>
            </CheckBox>
        </Grid>
    </ScrollViewer>
</UserControl>
